﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using net.veekee.common.data.csv;
using System.Collections;
using System.Text.RegularExpressions;

namespace net.veekee.common.data
{
    public class RegExFile
    {
        public static Match FindInFile(String filename, String regex)
        {
            String allRead = null;
            if (!File.Exists(filename))
                return null;
            using (System.IO.StreamReader testTxt = new System.IO.StreamReader(filename))
            {
                allRead = testTxt.ReadToEnd();
                testTxt.Close();
            }
            return Regex.Match(allRead, regex);
        }
    }
}
